Part Number Hot Search : 
00620 HMC28606 SP505 OH1881 70EPF08 MS320 BGA628 ZT485E
Product Description
Full Text Search
 

To Download AVR172 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  AVR172: sensorless commutation of brushless dc motor (bldc) using atmega32m1 and atavrmc320 features ? robust sensorless commutation control ? ramp-up sequence references [1] atmega32m1 data sheet [2] avr194: brushless dc motor control using atmega32m1 [3] avr430: mc300 hardware user guide [4] avr470: mc310 user guide [5] avr471: mc320 getting started guide [6] avr928: sensorless methods to drive bldc motors 1 introduction this application note describes how to implement a sensorless commutation of bldc motors with the atavrmc320 development kit. the atmega32m1 is equipped with integrated peripherals that reduce the number of external components required in a bl dc application. the atmega32m1 is suitable for sensorless commutation and for commutation with hall sensors as well, but this application note focuses on the sensorless commutation. the avr928 application note describes th e theory of the sensorless control method and must be carefully read first. 8-bit microcontrollers application note rev. 8306b-avr-05/10
2 AVR172 8306b-avr-05/10 2 hardware the hardware includes the atavrmc310 and atavrmc300 boards which are the two parts of the atavrmc320 starter kit. please refer to the atavrmc300 and atavrmc310 user guides : - avr430: mc300 hardware user guide - avr470: mc310 hardware user guide 2.1 mc310 jumpers setting the AVR172 firmware has been developed with the following jumper settings: table 2-1.atavrmc310 jumpers setting for sensorless control designator setting function j5 vm connect pb4 to vm? ( motor volta g e measurement if necessar y) j6 pfc oc connect to overcurrent si g nal j7 none used b y can a p p lications j8 shco connect pc5 to shco for current measurement j9 gndm connect pc4 to gndm for current measurement j12 txd connect pd3 to the rs232 drive r mosi a connect pd3 to isp connector ( for isp use ) rxdusb connect pd3 to rxd1 ( for usb inter f ace use ) j13 rxd connect pd4 to the rs232 drive r sck connect pd3 to isp connector ( for isp use ) txdusb connect pd3 to rxd1 ( for usb interface use ) j15 none used b y can a pp lication to add a termination resisto r j21 cm p - connect acmp0- to v+w bemf conditionin g j22 cm p + connect acmp0+ to u bemf conditionin g j23 cm p - connect acmp1- to u+w bemf conditionin g j24 cm p + connect acmp1+ to v bemf conditionin g j25 cm p - connect acmp2- to u+v bemf conditionin g j26 cm p + connect acmp2+ to w bemf conditionin g j28 vcc su pp l y the on board usb don g le from the board p ower su pp l y see also following picture of mc310 jumpers configurations :
AVR172 3 8306b-avr-05/10 figure 1. mc310 jumpers configuration 2.2 mc300 jumper settings table 2-1. atavrmc300 jumpers setting for sensorless control designator setting function j2 none p rovide +5v to su pp l y the atavrmc310 board on atavrmc300, vm and vin connectors can be supplied from the same +12v/7a power supply. nevertheless a separate +12v/1a can also be used to supply the vin (processor supply voltage). 2.3 power-supply this firmware example has been configured according to a power-supply vm=12v. this power-supply must be able to provide up to 4a output current. 2.4 motor the bldc motor provided inside mc320 and mc300 motor control kit has the following characteristics: manufacturer : tecmotion number of phases : 3 number of poles : 8 (4 pairs) rated voltage : 24v rated speed : 4000 rpm rated torque : 62.5 nm torque constant : 35 nm/a = k_tau
4 AVR172 8306b-avr-05/10 line to line resistance : 1.8 ohm = r back emf : 3.66 v/krpm = k_e peak current : 5.4a as vm=12v, the rated speed will be 2000 rpm. 2.5 atmega32m1 configuration atmega32m1 must be programmed to run at 16mhz using pll (set corresponding fuse bits). the ckdiv8 fuse must be disabled. extended/high/low fuses configurations are : ff/df/f3 2.6 technical advices 2.6.1 disconnecting the bldc motor the bl dc motor must not be disconnected while it is running or while its coils carry current. it is allowed to disconnect a bldc motor if the pwm duty cycle is 0% and the rotor is at rest so that no current is driv en through the coils. be careful, when stopping the power supply or pwm, a bldc motor with a high moment of inertia is able to run for a relatively long time. 2.6.2 ground and power wirings one de sign its own board has to take care of the ground wiring and power wiring. the power supply of the processor and additi onal signal conditioning components (e.g. additional fast comparators, operational am plifiers, ?) has to be decoupled from the motor power supply. the ground connection has to be of low resistance and low inductance to prevent against voltage drop and noise due to high currents. a ground plane within a multi layer pcb is recommended for proper operation. 3 firmware the example firmware is based on the sensorless method described in avr928 application note. it is operating in sensorless mode using the atmega32m1 internal comparators. hall sensor wires of the bldc motor of the kit can remain unconnected. the source file directory embeds an html documentation which can be opened through the readme.html file. the theory of the different tasks has be en detailed in avr928. the application to atmega32m1 is detailed in following sections. 3.1 main flow chart the firmware main flowchart is described below :
AVR172 5 8306b-avr-05/10 figure 2. main flow chart the tasks are scheduled thanks to the g_tick produced each 1.024ms with timer0.
6 AVR172 8306b-avr-05/10 3.2 ms_align phase the align phase forces the motor at a specific position. the time of this phase is controlled with align_time constant which is the ru_period_counter initial value (200 for mc310 motor). 3.3 ramp_up phase the ramp-up charateristics (duty-cycles and times) are stored in two tables: ? ramp_up_duty_table[] : which provid es the duty_cycle of the step ? ramp_up_time_table[] : which provides the length of the step (ru_step_length) these two tables are specific to the motor and the application. the scanning of the step sequences and the monitoring of the step length are achieved thanks to three independant counters : - ru_step_length_cntr : which counts the commutation time (up to ru_step_length variable) - ru_period_counter : which counts the step length (up to ramp_up_period constant) - ramp_up_index : which counts the step numbers (up to ramp_up_index_max constant) the figure below provides a waveform of steps timing : figure 3. steps timing
AVR172 7 8306b-avr-05/10 3.3.1 time of steps the s tep time is ramp_up_period = 50ms. 3.3.2 number of steps the pa rameter : ramp_up_index_max = 9, defines 10 steps ramp up. 3.3.3 parameters tables in firmwa re example, the tables have been defined according to the characteristics of the motor provided in the kit (see parameters in 2.4 motor section) : ramp _up_time_table[] = {26, 23,20,17,14,11,8,5,3,2,2}; ramp_up_duty_table[] = {122,124,126,1 29,131,133,135,137,140,143,145}; 3.3.4 sp1/pwm1 the usual pa rameters described in avr928 application note are: ? pwm1 = 50% ? sp1 = sp_max/60 the parameters defined with mc310 tecmotion motor are: ? pwm1 = 48% (= 122/256) ? sp1 : sp1 is defined thanks to the initialization value of ru_step_length : ru_step_length = ramp_up_step_max = 40 this variable determines one commutation each 40ms. so an electrical rotation time is 120ms. as the motor has 4 pairs of poles, the mechanical rotation time is 480ms. so the rotation speed is 60/0.48 = 125 rpm. so sp1 = sp_max/32. the second value of ru_step_length is 26 in the time table. it defines the following commutation time. 3.3.5 sp2/pwm2 the theo rical parameters described in avr928 application note are: ? pwm2 = 60% ? sp2 = sp_max/6 = sp1 / 10 the parameters defined with tecmotion motor are: ? pwm2 = 57% (= 145/256) ? sp2 : sp2 is defined thanks to the last value of ru_step_length : 2 this variable determines one commutation each 4ms. so an electrical rotation time is 12ms. as the motor has 4 pairs of poles, the mechanical rotation time is 48ms. so the rotation speed is 60/0.048 = 1250 rpm. so sp2 = sp_max/3.2.
8 AVR172 8306b-avr-05/10 this confirms also the usual ratio = 10 between sp1 and sp2 which is defined in avr498 application note. 3.4 last_ramp_up phase to avoid a shorten last step, this phase m onitors the last ramp-up step to guarantee it is ended properly before running in closed loop. 3.5 running phase 3.5.1 closed-loop block diagram the ru nning phase is a sensorless closed loop which block diagram is following : figure 4. closed-loop block diagram
AVR172 9 8306b-avr-05/10 3.5.2 running flowchart the flowc hart is following : figure 5. closed-loop flowchart ? motor_state is kept equal to ms_running mci_set_ref_speed() function updates the speed setpoint according to the potentiometer adjustment or the speed command received on serial transmission. in mc_regulation_loop() function, duty_cycle_reference is the duty_cycle variable which controls the pwm generator. this variable is the result of following functions : ? in open_loop: mci_set_ref_speed() function ? in speed_loop:
10 AVR172 8306b-avr-05/10 mc_control_speed(2*mci_get_ref_speed()) duty-cycle_reference is calculated from ref_spe ed and from monitored mci_get_measured_speed() measured_speed = (kspeed * 4) / mci_measured_period with mci_measured_period calculated in the interrupt vector of analog comparator 1. this interrupt uses timer 0 to compute the period. ? in current_loop : mc_control_current(mc_get_potentiometer_value() 3.5.3 sensorless detection and commutation management the a nalog comparators 0, 1 and 2 are used to detect the zero crossing of the u, v and w phases. the timer 1 is used to monitor the time between two consecutive zero crossings. this time corresponds to one sector of the electrical rotation of the motor. it equals 60 of the entire electrical period of the motor. when a zero crossing event occurs, the timer 1 value is stored. then this value is divided by 2 (providing the 30 time) and loaded into the compare a register of timer 1. then this value is added to the half of itself to provide the 45 time and loaded into the compare b register of timer 1. the timer 1 compare a event occurs 30 after the zero crossing. it activates the next commutation state and masks the zero cr ossing to avoid the discharge of the inductance (demagnetization) pulse generat ed at the end of a step when the active switches are released. due to the inductance of the motor coils, a voltage equals to -ldi/dt is generated, the demagnetization is done through t he diodes of the power bridge. the timer 1 compare b event releases t he zero crossing mask : enables the comparator n interrupt according to the motor_step variable. this timer1 interrupt provides the demagnetization mask delay.
AVR172 11 8306b-avr-05/10 4 rs232 communication with firmware 4.1 connecting atavrmc310 to use the rs232 interface connect pc com port to the atavrmc310 rs 232 connector through a direct cable. the serial configuration is: ? 3840 0 bauds, ? 8 bit data bit, ? 1 stop bit, ? no handshake, 4.2 pc applications user can communicate with firmware through rs232 with usual pc serial communication applications (i.e. hypertermin al) or the atmel ?motor control center? application which can be downloaded from atmel web at url : http://www.atmel.com 4.2.1 pc terminal : rs232 messages and commands at power u p the following welcome message is received on terminal : ?atmel motor control interface?. the following commands can be sent to the firmware: table 2-1. list of commands command action ru run motor st sto p motor hel p gives hel p fw set direction to forward bw set direction to backward ss set s p eed ( followed with s p eed value ) g i get id g 0 get status 0 g 1 get status 1 4.2.2 motor control center the use r guide is available in install directory at url : c:\program files\atmel\motor c ontrol center\help\overview.htm the AVR172 target must be selected first to get the right configuration : to select a target, execute the file > select target command or click the button in the toolbar. the following dialog pops up:
12 AVR172 8306b-avr-05/10 figure 6. motor control center interface 5 usb communication communication can be achieved from pc to usb connector of mc310 board. the avr470, mc310 hardware user guide det ails the configuration to be achieved. communication port becomes a virtual com port. same tools as described in section 4 ( rs232 communication with firmware), can be used through this virtual com port.
8306b-avr-05/10 disclaimer headquarters international atmel corporation 2325 orchard parkway san jose, ca 95131 usa tel: 1(408) 441-0311 fax: 1(408) 487-2600 atmel asia unit 1-5 & 16, 19/f bea tower, millennium city 5 418 kwun tong road kwun tong, kowloon hong kong tel: (852) 2245-6100 fax: (852) 2722-1369 product contact atmel europe le krebs 8, rue jean-pierre timbaud bp 309 78054 saint-quentin-en- yvelines cedex france tel: (33) 1-30-60-70-00 fax: (33) 1-30-60-71-11 atmel japan 9f, tonetsu shinkawa bldg. 1-24-8 shinkawa chuo-ku, tokyo 104-0033 japan tel: (81) 3-3523-3551 fax: (81) 3-3523-7581 web site http://www.atmel.com/ technical support avr@atmel.com sales contact www.atmel.com/contacts literature request www.atmel.com/literature disclaimer: the information in this document is pr ovided in connection with atmel products. no lic ense, express or implied, by estoppel or otherwise, to any intellectual property right is grant ed by this document or in connection with the sale of atmel products. except as set forth in atmel?s terms and conditions of sale located on atmel?s web site, atmel assu mes no liability whatsoever and disclaims any express, implied or statutory warranty relating to its products including, but not limited to, the implied warranty of merchantability, fitness for a particular pu rpose, or non-infringement. in no event sha ll atmel be liable for any direct, indirect, consequential, punitive, special or incidental damages (i ncluding, without limitation, damages for loss of profits, business interruption, or loss of information) arising out of the use or inability to use this document, even if atmel has been advised of the possibility of such damages. atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and rese rves the right to make changes to specifications and product descriptions at any time without notice. atmel does not make any commitment to update the information contained herein. unless specifically provided otherwise, at mel products are not suitable for, and shall not be used in, automotive applications. atme l?s products are not intended, authorized, or wa rranted for use as components in applications inte nded to support or sustain life. ? 2010 atmel corporation. all rights reserved . atmel ? , atmel logo and combinations thereof, avr ? , avr ? logo and others, are the registered trademarks or trademarks of atme l corporation or its subsidiaries. other terms and product names may be trademarks o f others.


▲Up To Search▲   

 
Price & Availability of AVR172

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X